using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.Serialization;

namespace KPIS.GERP.Models.ACM
{
    [DataContract, Table("AcmTransection")]
    public class Transection
    {
		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "TranId", ResourceType = typeof(Resources.TransectionResource))]
        public int TranId { get; set; }

		[DataMember, Display(Name = "TranType", ResourceType = typeof(Resources.TransectionResource))]
        public string TranType { get; set; }

		[DataMember, Display(Name = "FiscalPeriod", ResourceType = typeof(Resources.TransectionResource))]
        public string FiscalPeriod { get; set; }

        [ForeignKey("Transfer")]
        [DataMember, Display(Name = "TransferId", ResourceType = typeof(Resources.TransectionResource))]
        public Nullable<int> TransferId { get; set; }

        [DataMember, Display(Name = "TranCode", ResourceType = typeof(Resources.TransectionResource))]
        public string TranCode { get; set; }

        [DataMember, Display(Name = "TranDate", ResourceType = typeof(Resources.TransectionResource))]
        public Nullable<System.DateTime> TranDate { get; set; }

        [DataMember, Display(Name = "BgmYear", ResourceType = typeof(Resources.TransectionResource))]
        public Nullable<int> BgYear { get; set; }

        [ForeignKey("WorkArea")]
        [DataMember, Display(Name = "WorkAreaId", ResourceType = typeof(Resources.TransectionResource))]
        public Nullable<int> WorkAreaId { get; set; }

        [ForeignKey("MasBudgetSource")]
        [DataMember, Display(Name = "BgmSourceId", ResourceType = typeof(Resources.TransectionResource))]
        public Nullable<int> BgSourceId { get; set; }

        [DataMember, Display(Name = "RefNo", ResourceType = typeof(Resources.TransectionResource))]
        public string RefNo { get; set; }

        [DataMember, Display(Name = "TranName", ResourceType = typeof(Resources.TransectionResource))]
        public string TranName { get; set; }

        [DataMember, Display(Name = "Remarks", ResourceType = typeof(Resources.TransectionResource))]
        public string Remarks { get; set; }

        [DataMember, Display(Name = "ApprovedBy", ResourceType = typeof(Resources.TransectionResource))]
        public Nullable<int> ApprovedBy { get; set; }

        [DataMember, Display(Name = "ApprovedWhen", ResourceType = typeof(Resources.TransectionResource))]
        public Nullable<System.DateTime> ApprovedWhen { get; set; }

        [DataMember]
        public virtual FIM.Transfer Transfer { get; set; }

        [DataMember]
        public virtual HRM.MasWorkArea WorkArea { get; set; }

        [DataMember]
        public virtual BGM.MasBudgetSource MasBudgetSource { get; set; }



        #region RecordStatus

        [DataMember, Display(Name = "RecordStatus", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
        public string RecordStatus { get; set; }

        [DataMember, Display(Name = "CreatedBy", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
        public Nullable<int> CreatedBy { get; set; }

        [DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

        [DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
        public Nullable<int> UpdatedBy { get; set; }

        [DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

        #endregion

    }
}